localization: translate code comments to English#15
Conversation
Translate all non-English (mostly Chinese) code comments across app and libcore source to English. Comments only — no code, identifiers, logic, formatting, or string literals changed. Deliberately preserved (functional/UI string literals, not comments): - ProfileManager.kt "cn:中国" (country-match logic data) - NaiveSettingsActivity.kt "喵要打开隐藏功能"/"喵要关闭隐藏功能" (easter-egg triggers) - WebDAVSettingsActivity.kt "请稍后再试" (existing hardcoded Snackbar string)
Reword the two translated comments to reflect the actual defensive intent (both path variants are checked because suffix presence is device-dependent) rather than implying contradictory absolute Android behavior.
|
Warning Review limit reached
More reviews will be available in 6 hours, 29 minutes, and 8 seconds. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (28)
Comment |
|
@coderabbitai full review This branch translates code comments (Chinese -> English) only. Please verify: no code/logic/identifier/string-literal changes; the 3 protected functional literals (ProfileManager 'cn:中国', NaiveSettingsActivity easter-egg triggers, WebDAVSettingsActivity Snackbar) are preserved; and res/values-* translation files are untouched. Build verified (core + assembleOssDebug). |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
# Fetch PR details and file list
gh pr view 15 --repo hawkff/NekoBoxForAndroid --json title,body,files | jq .
echo "=== FILES CHANGED ==="
gh pr diff 15 --repo hawkff/NekoBoxForAndroid --name-onlyLength of output: 8210 🏁 Script executed: #!/bin/bash
# Get the full diff
gh pr diff 15 --repo hawkff/NekoBoxForAndroid 2>&1 | head -3000Length of output: 47616 🏁 Script executed: #!/bin/bash
# Check for the 3 protected literals in the changed files
echo "=== Checking protected literals ==="
echo "--- cn:中国 in ProfileManager ---"
rg "cn:中国" --type=kotlin -n -C2
echo "--- Easter egg triggers in NaiveSettingsActivity ---"
rg "喵要打开隐藏功能|喵要关闭隐藏功能" --type=kotlin -n -C2
echo "--- WebDAVSettingsActivity Snackbar ---"
rg "请稍后再试" --type=kotlin -n -C2
echo "=== Check for any remaining CJK in source files (non-res, non-vendor) ==="
rg -n "[\x{4e00}-\x{9fff}]" --type=kotlin --type=java --type=go \
--glob '!**/res/**' --glob '!**/libcore/gomobile/**' \
-l
echo "=== Check res/values-zh* and values-ja, values-ko are untouched (should exist) ==="
fd . --type=d --glob 'values-zh*' app/src/main/res/
fd . --type=d --glob 'values-ja' app/src/main/res/
fd . --type=d --glob 'values-ko' app/src/main/res/Length of output: 4310 🏁 Script executed: #!/bin/bash
# Get the full diff - second half
gh pr diff 15 --repo hawkff/NekoBoxForAndroid 2>&1 | tail -3000Length of output: 47630 🏁 Script executed: #!/bin/bash
# Check for any changes to res/values-* files in this PR
gh pr diff 15 --repo hawkff/NekoBoxForAndroid --name-only | grep "res/values"
echo "=== Check for any changes to string literals (non-comment lines with CJK in diff) ==="
gh pr diff 15 --repo hawkff/NekoBoxForAndroid 2>&1 | grep "^[+-]" | grep -v "^---\|^+++" | grep -P "[\x{4e00}-\x{9fff}]"
echo "=== Count added/removed lines ==="
gh pr diff 15 --repo hawkff/NekoBoxForAndroid 2>&1 | grep "^+" | grep -v "^+++" | wc -l
gh pr diff 15 --repo hawkff/NekoBoxForAndroid 2>&1 | grep "^-" | grep -v "^---" | wc -l
echo "=== Check for any non-comment line changes (lines changed that don't start with // or * or #) ==="
gh pr diff 15 --repo hawkff/NekoBoxForAndroid 2>&1 | grep "^[+-]" | grep -v "^---\|^+++" | grep -v "^\(+\|-\)[[:space:]]*//" | grep -v "^\(+\|-\)[[:space:]]*\*" | grep -v "^\(+\|-\)[[:space:]]*#" | head -100Length of output: 4864
✅ Verification Summary1 — Comments only, no code/logic/identifier/string-literal changesPass. Every modified line was inspected. Lines that contain non-comment tokens (trailing inline comments) were individually checked — in each case the code portion before
No identifiers, logic branches, data values, whitespace structure, or string literals were altered. 2 — Three protected functional literals preservedPass.
Post-PR CJK scan confirms only these 3 files retain CJK characters in source, exactly matching the 4 protected literals. Zero translated comments remain in Chinese. 3 —
|
Summary
Translates all non-English (mostly Chinese) code comments across the app and libcore
source to English, for a single-language, maintainable codebase.
Scope and safety
literals were deliberately preserved (they are not comments):
ProfileManager.kt"cn:中国"— country-match logic data.NaiveSettingsActivity.kt"喵要打开隐藏功能"/"喵要关闭隐藏功能"— magiceaster-egg trigger strings (translating would break the feature).
WebDAVSettingsActivity.kt"请稍后再试"— existing hardcoded Snackbar string.(Left as-is to keep this branch comments-only; could be moved to a string resource
in a separate UI PR.)
res/values-zh-*,values-ja,values-kowerenot touched — those are real UI translations for users and must stay.
libcore/gomobilewas excluded.Files
28 source files (
.kt/.java/.go), comment text only. Diff is ~1:1 linereplacement (+146/−144) — almost entirely full-line or trailing-comment swaps.
Verification (AWS Linux builder)
(confirmed by scan) — every comment was translated.
./gradlew app:assembleOssDebug— BUILD SUCCESSFUL.comments to reflect the actual defensive both-paths intent).